package com.jeeplus.modules.statistics.web;

import com.jeeplus.common.web.Result;
import com.jeeplus.modules.statistics.model.domain.Counter;
import com.jeeplus.modules.statistics.service.CounterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 窗口号 控制器
 *
 * @author hanKongBin
 * @version 1.0
 * @date 2021/3/2 20:34
 */
@RestController
@RequestMapping("/gx/statistics/counter")
@AllArgsConstructor
//@Api(tags = "高新统计分析-窗口号")
public class CounterController {

    private final CounterService counterService;

    //@ApiOperation("根据区域id查询窗口号")
    @GetMapping("/query")
    public Result<List<Counter>> query(@RequestParam String areaId) {
        return Result.succeed(counterService.findAllByAreaId(areaId), "获取成功！");
    }


}
